//会用科目树结构数据集。
Ext.define("ES.store.MembershipCatalogTreeStore",{
    extend:"Ext.data.TreeStore",
    fields:[
        { name:"id",type:"string"},
        { name:"text",  type:"string"},
        { name:"leaf", type:"boolean"},
        { name:"checked",type:"boolean"},
        { name:"createTime",type:"date"},
        { name:"cycle",type:"int"}
    ],
    nodeParam:"id",
    load : function(options){
        return this.callParent([options]);  
    },
    proxy:{
        type:"ajax",
        url:"MembershipCatalogTree.action",
        reader:{
            type:"json"
        },
        listeners:{
            exception:function(proxy, resp, operation, opt){
                Ext.MessageBox.show({
                    title:"远程异常",
                    msg:operation.getError(),
                    icon:Ext.MessageBox.ERROR,
                    buttons:Ext.Msg.OK
                });
            }
        }
    }
})